<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'gointernet.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<link rel="stylesheet" type="text/css" href="./bamcss/bam.css">
<script type="text/javascript" src="./plugin/jqueryqrcode/src/jquery.min.js"></script>
<style type="text/css">
.layer_zhuti iframe {
	height: 95%;
}

.layer_zhuti #td1 {
	width: 20%
}
</style>

</head>

  <body>
   		<div class="layer_head">
   			<div class="layer_title">上网情况</div>
   			<div class="layer_seek">
   					<input id="sousuo" type="text" value="请输入关键词" onFocus="if(value==defaultValue){value='';this.style.color='#000'}" 
   					onBlur="if(!value){value=defaultValue;this.style.color='#999'}" style="color:#999999" 
   					onkeypress="if (event.keyCode == 13)mohusousuo();"/>
	   			<a href="javascript:void(0)" onclick="mohusousuo()"><div class="layer_search"></div></a>
   			</div>
			<div style="clear: both;"></div>
   		</div>
   		<hr>
   		
   		<div class="layer_zhuti">
   			<table>
   				<tr class="tr1">
   					<td style="width:20%;">用户id</td>
	   				<td style="width:20%;">上网时长（分钟）</td>
	   				<td style="width:20%;">起始时间</td>
	   				<td style="width:20%;">结束时间</td>
	   				<td style="width:20%;">剩余时长</td>
   				</tr>
   			</table>
   			<iframe  id="iframe" class ="layer_iframe" name="wrap_iframe" src="<%=basePath %>bamjsp/ssidStatus/internet/table_interne.jsp" frameborder=0 ></iframe>
   		</div>
   		<div class="layer_bottom">
			<span class="span1" >**共 <span style="font-size: 14px;color: black;" id="span1"></span> 条数据 / 共
			<span style="font-size: 14px;color: black;" id="span2"></span>&nbsp;页 / 当前第
			<span style="font-size: 14px;color: black;" id="span3">1</span>&nbsp;页***</span> 
			
			<span style="float: right;"><input id="tiao"style="width: 50px" type="number" min="1"/><button style="width: 50px" onclick="tiaozhuan()" >go</button></span>
			<button style="margin-right: 40px" onclick="moye()">末 页</button>
			<button style="margin-right: 20px" onclick="xiaye()">下页</button>
			<button style="margin-right: 20px" onclick="shangye()">上 页</button>
			<button style="margin-right: 20px" onclick="shouye()">首页</button>
			<div style="clear: both;"></div>
		</div>
		<input type="hidden" >
  </body>

<script type="text/javascript">
	var pageNum=1;
	function mohusousuo(){
		var sousuo=$("#sousuo").val();
		if(sousuo==""||sousuo=="请输入关键词"){
			alert("请输入关键词");
		}else{
			wrap_iframe.window.userajax(sousuo);
		}
	}
	
	function shouye() {
		pageNum = 1;
		if (pageNum < 0) {
			alert("当前已经是首页！");
		} else {
			wrap_iframe.window.userajax();
		}
	}
	
	function shangye() {
		pageNum -= 1;
		if (pageNum == 0 || pageNum < 0) {
			alert("当前已经是首页！");
			pageNum = 1;
		} else {
			wrap_iframe.window.userajax("", pageNum);
		}
	}
	
	function xiaye() {
		pageNum += 1;
		// alert("父页面"+page);
		wrap_iframe.window.userajax("", pageNum);
	}
	
	function moye() {
		var num = $("#span2").text();
		if(pageNum==num){
			alert("当前已是最后一页");
		}else{
			wrap_iframe.window.userajax("", num);
		}
	}
	
	function showDiv(divtype, url, title) {
		window.parent.showDiv(divtype, url, title);
	}
</script>
</html>
